package com.hk.core.authentication.api.validatecode.image;

import com.hk.core.authentication.api.validatecode.ValidateCode;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.awt.image.BufferedImage;

/**
 * 图片验证码
 *
 * @author kevin
 * @date 2018-07-26 15:08
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class ImageCode extends ValidateCode {

    /**
     * 图片验证码
     */
    private transient BufferedImage image;

    public ImageCode() {
    }

    public ImageCode(BufferedImage image, String code, int expireIn) {
        super(code, expireIn);
        this.image = image;
    }

    @Override
    public ImageCode setId(String id) {
        return (ImageCode) super.setId(id);
    }

    @Override
    public ImageCode setCode(String code) {
        return (ImageCode) super.setCode(code);
    }

    @Override
    public ImageCode setExpireSecond(int expireSecond) {
        return (ImageCode) super.setExpireSecond(expireSecond);
    }

}
